<?php 
//basic search page
Configure::write('debug',2);
?>
<h2>Search</h2>
<form method="post" action="<?=$html->url('/products/basicSearch');?>">
<input type="text" name="search" value="<?=$this->params['form']['search']?>"/>
<input type="submit"/>
</form>
<?php

$open = $this->requestAction('/deliveries/afterOpen');
if (!isset($current_user)) {
	$current_user = array('member_id' => false, 'auth_type' => null);
}
foreach($products as $product) {
  echo $this->renderElement('product',array('product'=>$product,'open'=>$open, 'current_user'=>$current_user));
}
echo '<p>' . $search . '</p>';
?>
<div style="clear:both"></div>
<?php pr($products);?>